<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
    <link rel="stylesheet" type="text/css" th:href="@{{path}/common/v3/summernote/summernote-bs3.css?v={v}((path=${staticPath},v=${v})}">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div  data-th-replace="common/functionDepict"></div>
    <div>
        <div class="row">
            <!--第一步 开始-->
            <div class="pt10">
                <div class="col-sm-9">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>填写基本信息</h5>
                        </div>
                        <div class="ibox-content clearfix pt10">
                            <div class="form-horizontal">
                                <form id="giftCardCreateFrom">
                                    <!--<%&#45;&#45;<input type="hidden" name="giftCard.id"  value="${giftCard.id}"/>&#45;&#45;%>-->
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 礼品卡名称</label>
                                        <div class="col-sm-8">
                                            <input class="form-control validate-data"  value="" name="cardName" type="text">
                                            <span class="help-block m-b-none c-999"> 礼品卡名称 限30个字以内</span>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 礼品卡类型</label>
                                        <div class="col-sm-8">
                                            <div class="radio i-checks" id="couponCondition">
                                                <p><label><input type="radio" checked="" value="1" name="cardType"> <i></i> 学员卡-代替注册功能，学员持卡直接加入系统</label></p>
                                                <p><label><input type="radio"  value="2" name="cardType"> <i></i> 课程卡-需用户自行注册，注册后在个人中心激活获取课程</label></p>
                                                <p><label><input type="radio" value="3" name="cardType"> <i></i> 充值卡-需用户自行注册，注册后在个人中心激活，可以支付时代替部分金额。</label></p>
                                            </div>
                                            <input id="giftCardCardType" type="hidden" value=""/>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 礼品卡数量</label>
                                        <div class="col-sm-8">
                                            <input class="form-control validate-data"  value="" name="genNum" type="text">
                                            <span class="help-block m-b-none c-999"> 只支持正整数</span>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group myExchange" style="display: none">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 积分兑换</label>
                                        <div class="col-sm-8">
                                            <input type="checkbox" name="isExchange" value="true"  class="i-checks">
                                            <span class="help-block m-b-none c-999"> 勾选后只能用于积分兑换</span>
                                        </div>
                                    </div>

                                    <div class="hr-line-dashed myExchange" style="display: none"></div>
                                    <div class="form-group moneyCard" style="display: none">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 礼品卡金额</label>
                                        <div class="col-sm-8">
                                            <input class="form-control validate-data"  value="" name="amount" type="text">
                                            <span class="help-block m-b-none c-999"> 只支持正整数礼品卡数最多只能生成一万张</span>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed moneyCard "  style="display: none"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 使用时间</label>
                                        <div class="col-sm-10">
                                            <div>
                                                <div class="radio i-checks">
                                                    <label><input type="radio"  checked="" value="1" name="timeType"> <i></i> 时间段</label>
                                                    <label><input type="radio"  value="2" name="timeType"> <i></i> 天数</label>
                                                </div>
                                                <div class="clearfix m-t beginTimeAndEndTime ">
                                                    <div class="pull-left" style="width: 240px">
                                                        <input id="startDate" name="beginTime" value="" class="laydate-icon form-control layer-date" placeholder="请输入开始时间">
                                                    </div>
                                                    <div class="pull-left mt10">
                                                        <span class="c-999 fs14">&nbsp_&nbsp</span>
                                                    </div>
                                                    <div class="pull-left" style="width: 240px">
                                                        <input id="endDate" name="endTime" value="" class="laydate-icon form-control layer-date" placeholder="请输入结束时间">
                                                    </div>
                                                </div>
                                                <div class="clearfix m-t timeDays" style="display: none">
                                                    <input class="form-control validate-data"  value="" name="timeDays" type="text">
                                                    <span class="help-block m-b-none c-999"> 只支持正整数</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed "></div>
                                    <div class="form-group courseCard" style="display: none">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 限定课程</label>
                                        <div class="col-sm-8">
                                                <p>
                                                    <button id="selectCourse" class="btn btn-primary " type="button"><i class="fa fa-plus"></i> 选择课程</button>
                                                    <span class="c-red">最多设置三个课程</span>
                                                </p>
                                                <div id="course-div" class="well m-t mt10 no-padding">
                                                    <input id="courseIds" type="hidden"  name="courseIds" value=""/>
                                                    <ul class="list-group" id="courseName">

                                                    </ul>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed courseCard"  style="display: none"></div>
                                    <div class="form-group ">
                                        <label class="col-sm-2 control-label text-right"> <i class="c-red">*</i> 礼品卡描述</label>
                                        <!--<%&#45;&#45;<div class="col-sm-10">
                                            <div id="giftCardDepict" style="width: 100%"></div>&#45;&#45;%>-->
                                        <div class="col-sm-9"><textarea id="giftCard_create" name="depict" class="form-control" ></textarea></div>
                                        <!--<%&#45;&#45;</div>&#45;&#45;%>-->
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <div class="col-sm-10 col-sm-offset-2">
                                            <button class="btn btn-primary ml10" id="submitGiftCard" type="button">保存</button>
                                            <button class="btn btn-white ml10" type="button" id="onBack">取消</button>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div data-th-replace="common/importantNotes"></div>

            </div>
            <!--第一步 结束-->
        </div>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script type="text/javascript" th:src="@{{path}/admin/business/course/cou/select-common-course.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/op/giftCard/giftCard_create.js?v={v}(path=${staticPath},v=${v})}"> </script>
<script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>
